package me.zhengjie.server;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.dao.StoreLocalDao;
import me.zhengjie.dao.StoreOutsideDao;
import me.zhengjie.dao.dto.StoreOutsideQueryCriteria;
import me.zhengjie.utils.PageResult;
import me.zhengjie.vo.Result;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @author xinglin.lu
 * @description 针对表【iws_store_outside】的数据库操作Service
 * @createDate 2025-06-13 17:05:48
 */
public interface StoreOutsideService extends IService<StoreOutsideDao> {
    /**
     * 查询数据分页
     *
     * @param criteria 条件
     * @param page     分页参数
     * @return PageResult
     */
    PageResult<StoreOutsideDao> queryAll(StoreOutsideQueryCriteria criteria, Page<Object> page);

    /**
     * 查询所有数据不分页
     *
     * @param criteria 条件参数
     * @return List<StoreOutsideDao>
     */
    List<StoreOutsideDao> queryAll(StoreOutsideQueryCriteria criteria);

    /**
     * 创建
     *
     * @param resources /
     */
    void create(StoreOutsideDao resources);

    /**
     * 编辑
     *
     * @param resources /
     */
    void update(StoreOutsideDao resources);

    /**
     * 多选删除
     *
     * @param ids /
     */
    void deleteAll(List<String> ids);

    /**
     * 导出数据
     *
     * @param all      待导出的数据
     * @param response /
     * @throws IOException /
     */
    void download(List<StoreOutsideDao> all, HttpServletResponse response) throws IOException;


    /**
     * 查询可用储位
     * @param name 储位名称
     * @param workIp 工作IP
     * @param floor 楼层
     * @param goodType 货物类型
     * @param storeIdList 储位列表
     */
    void findAvailableStoreIdList(String name, String workIp, String floor, String goodType, List<String> storeIdList);

    /**
     * 根据楼层和货物类型查询可用储位
     *
     * @param storeOutsideDao 储位信息
     */
    boolean updateData(StoreOutsideDao storeOutsideDao);

    /**
     * 批量更新数据
     * @param ids 储位ids
     * @param storeOutsideDao 储位信息
     * @return
     */
    boolean updateDataList(List<String> ids, StoreOutsideDao storeOutsideDao);
}
